import 
{ 
    ref,
    reactive,
    getCurrentInstance, 
    toRefs,
    onMounted
} from 'vue'
import { ElImage } from 'element-plus'
export default {
    name:'logonPage',
    components:{ ElImage },
    setup(props) {
        const { proxy } = getCurrentInstance();
        onMounted(() => {
            window.addEventListener('message', function(e){    // 主页⾯监听message事件,
                var data = e.data;
                console.log(data);
                proxy.$http.saveData(proxy,data).then(res=>{
                    console.log(res);
                }).catch(err=>{
                    console.log(err);
                })
            }, false);
        })
    }
}